package com.zhuiyun.project.api.appuser.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * @ClassName UserModel
 * @Description TODO
 * @Author hbx
 * @Date 2023/6/5 17:06
 **/
@ApiModel("用户模型类")
@Data
public class AppUserModel {


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty("id")
    private Integer id;


    @ApiModelProperty("用户名")
    private String userName;


    @ApiModelProperty("头像id")
    private String imageId;


    @ApiModelProperty("用户手机号")
    private String userPhone;


    @ApiModelProperty("用户生日")
    private String userBirthday;


    @ApiModelProperty("用户性别")
    private Integer userSex;


    @ApiModelProperty("用户类型")
    private Integer userType;


    @ApiModelProperty("修改时间")
    private Integer prohibition;


    @ApiModelProperty("注销")
    private Integer logOff;


    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//JsonFormat是出参格式化。
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    private Date createTime;


    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//JsonFormat是出参格式化。
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    private Date updateTime;


    @ApiModelProperty("微信用户的开放id")
    private String openId;


    @ApiModelProperty("年龄")
    private Integer age;


    @ApiModelProperty("注销外键")
    private Integer cancellationId;


    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("注销时间")
    private Date cancellationTime;


    @ApiModelProperty("注销原因")
    private String cancellationReason;


    @ApiModelProperty("恢复状态")
    private Integer recoverStatus;
    /**
     * 好友请求新消息数量
     */
    @ApiModelProperty("好友请求新消息数量")
    private Integer friendNewNum;


}
